package com.hsshy.beam.sharding.controller;


import com.hsshy.beam.sharding.service.DemoService;
import io.swagger.annotations.Api;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/**
 * 秒杀库存表
 *
 * @author hs
 * @email 457030599@qq.com
 * @date 2018-11-20 14:52:22
 */
@Api(value="ShardingController",tags={"分库分表读写分离"})
@RequestMapping("/sharding")
@RestController
public class ShardingController  {

    @Autowired
    private DemoService demoService;

    @ApiOperation(value = "测试分库分表")
    @GetMapping("/test1")
    public void test1(){

        demoService.demo();
    }

    @ApiOperation(value = "测试分库分表")
    @GetMapping("/test2")
    public void test2(Long userId,Long orderId){

        demoService.demo1(userId,orderId);
    }






}